package com.tjzx.entity;

import java.sql.Timestamp;

/**
 * PeispatientSportId entity. @author MyEclipse Persistence Tools
 */

public class PeispatientSportId implements java.io.Serializable {

	// Fields

	private Integer id;
	private Integer idPatient;
	private Timestamp sportTime;
	private String sportMethod;
	private Integer sportDuration;
	private Integer sportHeartrate;
	private String sportFeel;
	private Integer energyCost;
	private Double weight;
	private Double waistLine;
	private Timestamp createtime;

	// Constructors

	/** default constructor */
	public PeispatientSportId() {
	}

	/** minimal constructor */
	public PeispatientSportId(Integer id) {
		this.id = id;
	}

	/** full constructor */
	public PeispatientSportId(Integer id, Integer idPatient,
			Timestamp sportTime, String sportMethod, Integer sportDuration,
			Integer sportHeartrate, String sportFeel, Integer energyCost,
			Double weight, Double waistLine, Timestamp createtime) {
		this.id = id;
		this.idPatient = idPatient;
		this.sportTime = sportTime;
		this.sportMethod = sportMethod;
		this.sportDuration = sportDuration;
		this.sportHeartrate = sportHeartrate;
		this.sportFeel = sportFeel;
		this.energyCost = energyCost;
		this.weight = weight;
		this.waistLine = waistLine;
		this.createtime = createtime;
	}

	// Property accessors

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getIdPatient() {
		return this.idPatient;
	}

	public void setIdPatient(Integer idPatient) {
		this.idPatient = idPatient;
	}

	public Timestamp getSportTime() {
		return this.sportTime;
	}

	public void setSportTime(Timestamp sportTime) {
		this.sportTime = sportTime;
	}

	public String getSportMethod() {
		return this.sportMethod;
	}

	public void setSportMethod(String sportMethod) {
		this.sportMethod = sportMethod;
	}

	public Integer getSportDuration() {
		return this.sportDuration;
	}

	public void setSportDuration(Integer sportDuration) {
		this.sportDuration = sportDuration;
	}

	public Integer getSportHeartrate() {
		return this.sportHeartrate;
	}

	public void setSportHeartrate(Integer sportHeartrate) {
		this.sportHeartrate = sportHeartrate;
	}

	public String getSportFeel() {
		return this.sportFeel;
	}

	public void setSportFeel(String sportFeel) {
		this.sportFeel = sportFeel;
	}

	public Integer getEnergyCost() {
		return this.energyCost;
	}

	public void setEnergyCost(Integer energyCost) {
		this.energyCost = energyCost;
	}

	public Double getWeight() {
		return this.weight;
	}

	public void setWeight(Double weight) {
		this.weight = weight;
	}

	public Double getWaistLine() {
		return this.waistLine;
	}

	public void setWaistLine(Double waistLine) {
		this.waistLine = waistLine;
	}

	public Timestamp getCreatetime() {
		return this.createtime;
	}

	public void setCreatetime(Timestamp createtime) {
		this.createtime = createtime;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof PeispatientSportId))
			return false;
		PeispatientSportId castOther = (PeispatientSportId) other;

		return ((this.getId() == castOther.getId()) || (this.getId() != null
				&& castOther.getId() != null && this.getId().equals(
				castOther.getId())))
				&& ((this.getIdPatient() == castOther.getIdPatient()) || (this
						.getIdPatient() != null
						&& castOther.getIdPatient() != null && this
						.getIdPatient().equals(castOther.getIdPatient())))
				&& ((this.getSportTime() == castOther.getSportTime()) || (this
						.getSportTime() != null
						&& castOther.getSportTime() != null && this
						.getSportTime().equals(castOther.getSportTime())))
				&& ((this.getSportMethod() == castOther.getSportMethod()) || (this
						.getSportMethod() != null
						&& castOther.getSportMethod() != null && this
						.getSportMethod().equals(castOther.getSportMethod())))
				&& ((this.getSportDuration() == castOther.getSportDuration()) || (this
						.getSportDuration() != null
						&& castOther.getSportDuration() != null && this
						.getSportDuration()
						.equals(castOther.getSportDuration())))
				&& ((this.getSportHeartrate() == castOther.getSportHeartrate()) || (this
						.getSportHeartrate() != null
						&& castOther.getSportHeartrate() != null && this
						.getSportHeartrate().equals(
								castOther.getSportHeartrate())))
				&& ((this.getSportFeel() == castOther.getSportFeel()) || (this
						.getSportFeel() != null
						&& castOther.getSportFeel() != null && this
						.getSportFeel().equals(castOther.getSportFeel())))
				&& ((this.getEnergyCost() == castOther.getEnergyCost()) || (this
						.getEnergyCost() != null
						&& castOther.getEnergyCost() != null && this
						.getEnergyCost().equals(castOther.getEnergyCost())))
				&& ((this.getWeight() == castOther.getWeight()) || (this
						.getWeight() != null
						&& castOther.getWeight() != null && this.getWeight()
						.equals(castOther.getWeight())))
				&& ((this.getWaistLine() == castOther.getWaistLine()) || (this
						.getWaistLine() != null
						&& castOther.getWaistLine() != null && this
						.getWaistLine().equals(castOther.getWaistLine())))
				&& ((this.getCreatetime() == castOther.getCreatetime()) || (this
						.getCreatetime() != null
						&& castOther.getCreatetime() != null && this
						.getCreatetime().equals(castOther.getCreatetime())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getId() == null ? 0 : this.getId().hashCode());
		result = 37 * result
				+ (getIdPatient() == null ? 0 : this.getIdPatient().hashCode());
		result = 37 * result
				+ (getSportTime() == null ? 0 : this.getSportTime().hashCode());
		result = 37
				* result
				+ (getSportMethod() == null ? 0 : this.getSportMethod()
						.hashCode());
		result = 37
				* result
				+ (getSportDuration() == null ? 0 : this.getSportDuration()
						.hashCode());
		result = 37
				* result
				+ (getSportHeartrate() == null ? 0 : this.getSportHeartrate()
						.hashCode());
		result = 37 * result
				+ (getSportFeel() == null ? 0 : this.getSportFeel().hashCode());
		result = 37
				* result
				+ (getEnergyCost() == null ? 0 : this.getEnergyCost()
						.hashCode());
		result = 37 * result
				+ (getWeight() == null ? 0 : this.getWeight().hashCode());
		result = 37 * result
				+ (getWaistLine() == null ? 0 : this.getWaistLine().hashCode());
		result = 37
				* result
				+ (getCreatetime() == null ? 0 : this.getCreatetime()
						.hashCode());
		return result;
	}

}